home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Clipboard
/
ScrapWriter.h
< prev
Wrap
Text File
|
2000-06-23
|
744b
|
44 lines
// ScrapWriter.h
#ifndef ScrapWriter_h
#define ScrapWriter_h
#ifndef ScrapType_h
#include "ScrapType.h"
#endif
#ifndef ConstData_h
#include "ConstData.h"
#endif
class ScrapWriter
{
friend class Clipboard;
friend class GlobalCutter;
private:
bool approved;
// not implemented:
ScrapWriter( const ScrapWriter& );
void operator=( const ScrapWriter& );
static void ThrowError( int32 error );
ScrapWriter();
public:
~ScrapWriter();
void Write( ScrapType, ConstData );
void Approve() { approved = true; }
/*
If a change is not approved,
the scrap will be cleared and left invalid.
Thus if an exception is thrown before approval,
incomplete data won't be propagated.
*/
};
#endif